package br.gov.dataprev.treinamento.ejb.modelo;


import java.io.Serializable;

public class TelefonePK implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private Short ddd;
	
	private Integer telefone;
	
	public TelefonePK(Short ddd, Integer telefone) {
		super();
		this.ddd = ddd;
		this.telefone = telefone;
	}

	public TelefonePK() {
		super();
	}

	public Short getDdd() {
		return ddd;
	}

	public void setDdd(Short ddd) {
		this.ddd = ddd;
	}

	public Integer getTelefone() {
		return telefone;
	}

	public void setTelefone(Integer telefone) {
		this.telefone = telefone;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ddd == null) ? 0 : ddd.hashCode());
		result = prime * result
				+ ((telefone == null) ? 0 : telefone.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof TelefonePK))
			return false;
		TelefonePK other = (TelefonePK) obj;
		if (ddd == null) {
			if (other.ddd != null)
				return false;
		} else if (!ddd.equals(other.ddd))
			return false;
		if (telefone == null) {
			if (other.telefone != null)
				return false;
		} else if (!telefone.equals(other.telefone))
			return false;
		return true;
	}
	
	

}
